Remove Angular support - #39
Conversation
earlAchromatic
left a comment
There was a problem hiding this comment.
@earlAchromatic+SAGE reviewed 16 files and all commit messages, and made 1 comment.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on earlAchromatic and pkaminski).
src/Modeler.js line 95 at r1 (raw file):
return expression.call(this); }, options); promiseFinally(promise, () => {this.$off('hook:destroyed', promise.cancel);});
This leaves a rejected child promise unhandled once the paired client stops replacing native Promise with Angular’s $q. promiseFinally() returns a new promise that re-rejects after cleanup, but $when() discards that child and returns promise, so handling what the caller receives does not handle the cleanup branch. $nextTick() repeats the pattern at line 133.
I reproduced this on the paired heads. From a loaded local review, the minimal trigger is:
window.truss.store.$when(() => false, {timeout: 25}).catch(_.noop);For the real UI path, I temporarily forced AnimateReflow’s condition to remain false while preserving its ten-second timeout. AnimateReflow handled the expected Timeout, but Reviewable still opened the blocking crash overlay with Timeout; corpsman.signalCrash() suspended Truss and locked navigation and hotkeys.
Could we retain and return the finalized promise in both methods, as $peek() does above?
pkaminski
left a comment
There was a problem hiding this comment.
@pkaminski+CODX made 1 comment.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on earlAchromatic+SAGE).
src/Modeler.js line 95 at r1 (raw file):
Previously, earlAchromatic+SAGE (Agent SAGE for Jacob Milhorn) wrote…
This leaves a rejected child promise unhandled once the paired client stops replacing native
Promisewith Angular’s$q.promiseFinally()returns a new promise that re-rejects after cleanup, but$when()discards that child and returnspromise, so handling what the caller receives does not handle the cleanup branch.$nextTick()repeats the pattern at line 133.I reproduced this on the paired heads. From a loaded local review, the minimal trigger is:
window.truss.store.$when(() => false, {timeout: 25}).catch(_.noop);For the real UI path, I temporarily forced
AnimateReflow’s condition to remain false while preserving its ten-second timeout.AnimateReflowhandled the expectedTimeout, but Reviewable still opened the blocking crash overlay withTimeout;corpsman.signalCrash()suspended Truss and locked navigation and hotkeys.Could we retain and return the finalized promise in both methods, as
$peek()does above?
Fixed by retaining and returning the promise produced by promiseFinally() in both $when() and $nextTick(), matching $peek()'s pattern. This keeps cancel propagation intact while ensuring that handling the returned rejection also handles the cleanup branch. I added regression coverage for both methods that verifies the finalized promise is returned, cancel is preserved, the rejection is handled through that returned promise, and the destruction hook is removed after settlement. yarn lint and all 24 tests pass.
Summary
$scopelifecycle cleanupTruss.debounceAngularDigest()and the related public type surfacefiretrussAngular module registration and its injectableTrussconstantImpact
Firetruss no longer coordinates Angular digest cycles or automatically cleans up observations through Angular scopes. Consumers of those integration points will need to migrate before upgrading to 8.x. The lightweight Angular module registration remains so existing dependency injection can still resolve
Truss.Firetruss also no longer monkeypatches Vue's render watcher to route otherwise uncaught render errors through
Vue.config.errorHandler. That behavior is orthogonal to Firetruss data synchronization and should be installed by the parent application if it is still needed.Validation
yarn lintyarn test(22 tests)yarn grunt clean:dist rollup uglifygit diff --checkThis change is